package com.hollycrm.springframework.beans;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2004</p>
 * <p>Company: </p>
 * @author Tian Kai
 * @version 1.0
 */

public class SimpleNestedBean {

    protected String beanName;
    protected Object nestedBean;

    public Object getNestedBean() {
        return nestedBean;
    }
    public void setNestedBean(Object nestedBean) {
        this.nestedBean = nestedBean;
    }
    public String getBeanName() {
        return beanName;
    }
    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    public String toString() {
        StringBuffer sb = new StringBuffer();
        if (beanName == null)
            sb.append(super.toString());
        else {
            sb.append(beanName);
            if (nestedBean != null) {
                sb.append("\n -> ");
                sb.append(nestedBean.toString());
            }
        }
        return sb.toString();
    }

}
